<%@ page language="java" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<%
Object obj=request.getSession().getAttribute("role_resource");
if(null==obj){
	response.setStatus(1000);
	return;
}
%> 
		<script type="text/javascript">
			//搜索条件外包商下拉列表
			var epiboly_store=new Ext.data.JsonStore({
				root: "data",
	    		fields : [ "id", "name"],
				url : "epiboly!listAll.action",
				listeners : {
					"load": function() {
						var RecordName = Ext.data.Record.create([
							{name: "id"},
							{name: "name"}
						]);
						var newRecord = new RecordName({
							name: "全部"
						});
						this.insert(0,newRecord);
					}
				}
			});
			//卡产品下拉列表
			var card_store = new Ext.data.JsonStore( {
				root: "data",
				fields : ["prodId","prodName"],
				url: "product!ProdName.action",
				listeners : {
					"load": function() {
						var RecordName = Ext.data.Record.create([
							{name: "prodId"},
							{name: "prodName"}
						]);
						var newRecord = new RecordName({
							prodName: "全部"
						});
						this.insert(0,newRecord);
					}
				}
			});
			var store = new Ext.data.JsonStore( {
				fields: ["a","b","c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n"],
				data: [{a:"2011-09", b:"深圳市",c:"1000",d:"0.5",e:"0.2",f:"700",g:"0.2",h:"0.2",i:"400",j:"0.1",k:"100",l:"600",m:"2600",n:"3"}]
			});
			
			var monthcost_pel = new Ext.Panel( {
				id: "panel",
				boeder:false,					
				layout: "card",
				activeItem:0,
				items:[{
					id: "p",
					xtype:"grid",
					store: store,
					stripeRows: true,
					loadMask: true,
					border : false,
					boxMinHeight: 300,
					headersDisabled: true,
					columns:[
						new Ext.grid.RowNumberer( {header : "序号",	width : 35}), 
					    {dataIndex : "a",	header : "账期", menuDisabled: true},
					    {dataIndex : "b",	header : "地区", menuDisabled: true},
					    {dataIndex : "c",	header : "数量", menuDisabled: true},
					    {dataIndex : "d",	header : "账单印刷费", menuDisabled: true},  
					    {dataIndex : "e",	header : "信封印刷费", menuDisabled: true},  
					    {dataIndex : "f",	header : "收费小计（元）", menuDisabled: true},
					    {dataIndex : "g",	header : "账单打印费", menuDisabled: true},
					    {dataIndex : "h",	header : "封装费", menuDisabled: true},
					    {dataIndex : "i",	header : "收费小计（元）", menuDisabled: true},
					    {dataIndex : "j",	header : "投递费", menuDisabled: true},
					    {dataIndex : "k",	header : "收费小计（元）", menuDisabled: true},
					    {dataIndex : "l",	header : "插页费小计（元）", menuDisabled: true},
					    {dataIndex : "m",	header : "合计金额（元）", menuDisabled: true},
					    {dataIndex : "n",	header : "每封页数", menuDisabled: true}
					],
					tbar:[
						{text: "期别:"},
						{xtype:	"datefield",	format:"Y-m",	editable :false},
						{text: "--"},
						{xtype:	"datefield",	format:"Y-m",	editable :false},
						{text: "卡产品:"},
						{xtype:	"billCombox",	valueField: "prodId",	displayField: "prodName",	store: card_store},
						{text: "外包商:"},
						{xtype:	"billCombox",	displayField: "name",	store: epiboly_store},
						{pressed: true,			text :"查询"}
					],
					bbar: new Ext.ux.PagingToolbar({
						pageSize: limit,
						store : store
					})
				}]
			});
			epiboly_store.load();
			card_store.load();
					
			var CenterPanel=Ext.getCmp("CenterPanel");
			CenterPanel.removeAll();
			CenterPanel.add(monthcost_pel);
			CenterPanel.doLayout();
</script>